﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LCL.LData;

namespace LCL.Tools
{
    /// <summary>
    /// 配置文件
    /// </summary>
    [Serializable]
    public class AppConfig
    {
        public const string ASSEMBLY_VERSION = "1.0.0";
        public const string ASSEMBLY_YEAR = "2017";
        
        public string DbTableName = "";
        public string DbName = "master";
        public string NameSpace = "LCL";
        public string TableFormat = "uc_|lcl_|table_|zt_|lmg_|zte_|cms_|tky_|base_|_|sys_";
        private static AppConfig uniqueInstance;
        private static readonly object locker = new object();
        private AppConfig()
        {

        }
        /// <summary>
        /// 定义公有方法提供一个全局访问点,同时你也可以定义公有属性来提供全局访问点
        /// </summary>
        /// <returns></returns>
        public static AppConfig GetInstance()
        {
            if (uniqueInstance == null)
            {
                lock (locker)
                {
                    if (uniqueInstance == null)
                    {
                        uniqueInstance = new AppConfig();
                    }
                }
            }
            return uniqueInstance;
        }
    }
}
